package com.yv.websocket.controller.v2;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.messaging.handler.annotation.MessageMapping;
import org.springframework.stereotype.Controller;

import com.yv.websocket.model.InMessage;
import com.yv.websocket.service.WebSocketService;

/**
 * SimpleMessagingTemplate
 * @author Administrator
 *
 */
@Controller
public class V2GameInfoController {


	@Autowired
	private WebSocketService ws;
	
	//页面访问localhost:8080/v2/index.html
	@MessageMapping("/v2/chat")
	public void gameInfo(InMessage message) throws InterruptedException{
		
		ws.sendTopicMessage("/topic/game_rank",message);
	}

	
	

}



